package com.itheima.app;

import com.itheima.dao.OrderDao;
import com.itheima.service.OrderService;
import com.itheima.service.StrudentService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class OrderApp {
    public static void main(String[] args) {
        //1.解析配置文件 获得容器对象
        ApplicationContext orderContext = new ClassPathXmlApplicationContext("application-order.xml");
        //2.从容器中获得bean对象
        OrderService ordDao = (OrderService)orderContext.getBean("orderService");
        //3.使用
        ordDao.save();
    }
}
